package pattern.proxy.example1;

import java.lang.reflect.Proxy;

public class Main {
	public static void main(String[] argv) throws Exception {
		MyInterface myintf = (MyInterface) Proxy.newProxyInstance(
				MyInterface.class.getClassLoader(),
				new Class[] { MyInterface.class }, new ProxyClass(
						new MyInterfaceImpl()));
		System.out.println(myintf instanceof Proxy);

		myintf.method();
	}
}
